package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DamageTypeManagementMapper;
import com.ruoyi.system.domain.DamageTypeManagement;
import com.ruoyi.system.service.IDamageTypeManagementService;

/**
 * 报损类型设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-30
 */
@Service
public class DamageTypeManagementServiceImpl implements IDamageTypeManagementService
{
    @Autowired
    private DamageTypeManagementMapper damageTypeManagementMapper;

    /**
     * 通过id查询报损类型设置
     *
     * @param id 报损类型设置主键
     * @return 报损类型设置
     */
    @Override
    public DamageTypeManagement selectDamageTypeManagementById(Long id)
    {
        return damageTypeManagementMapper.selectDamageTypeManagementById(id);
    }

    /**
     * 通过报损类型名称查询报损类型设置列表
     *
     * @param damageTypeName 报损类型名称
     * @return 报损类型设置
     */
    @Override
    public List<DamageTypeManagement> selectDamageTypeManagementListByName(String damageTypeName)
    {
        return damageTypeManagementMapper.selectDamageTypeManagementListByName(damageTypeName);
    }

    /**
     * 新增报损类型设置
     *
     * @param damageTypeManagement 报损类型设置
     * @return 结果
     */
    @Override
    public int insertDamageTypeManagement(DamageTypeManagement damageTypeManagement)
    {
        return damageTypeManagementMapper.insertDamageTypeManagement(damageTypeManagement);
    }

    /**
     * 修改报损类型设置
     *
     * @param damageTypeManagement 报损类型设置
     * @return 结果
     */
    @Override
    public int updateDamageTypeManagement(DamageTypeManagement damageTypeManagement)
    {
        return damageTypeManagementMapper.updateDamageTypeManagement(damageTypeManagement);
    }

    /**
     * 通过id批量删除报损类型设置信息
     *
     * @param ids 需要删除的报损类型设置主键
     * @return 结果
     */
    @Override
    public int deleteDamageTypeManagementByIds(Long[] ids)
    {
        return damageTypeManagementMapper.deleteDamageTypeManagementByIds(ids);
    }



    /**
     * 通过id删除报损类型设置信息
     *
     * @param id 报损类型设置主键
     * @return 结果
     */
    @Override
    public int deleteDamageTypeManagementById(Long id)
    {
        return damageTypeManagementMapper.deleteDamageTypeManagementById(id);
    }
}
